package com.example.foobar.business.service.impl;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.example.foobar.business.service.DidiCompanyService;
import com.example.foobar.business.service.DidiService;
import com.example.foobar.dao.service.DidiCompanyDaoService;
import com.example.foobar.dao.service.DidiOrdersDaoService;
import com.example.foobar.dto.DidiURL;
import com.example.foobar.dto.DidiURLRequestDTO;
import com.example.foobar.entity.DidiCompany;
import com.example.foobar.param.DidiCompanyPageParam;
import com.google.gson.Gson;
import io.geekidea.springbootplus.framework.core.pagination.Paging;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.digest.DigestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.TreeMap;

/**
 * 分析系统配置文件 服务实现类
 *
 * @author 郑英奔
 * @since 2021-05-31
 */
@Slf4j
@Service
public class DidiCompanyServiceImpl implements DidiCompanyService {

    @Autowired
    DidiCompanyDaoService didiCompanyDaoService;

    @Override
    public boolean saveDidiCompany(DidiCompany didiCompany) throws Exception {
        return didiCompanyDaoService.saveDidiCompany(didiCompany);
    }

    @Override
    public boolean updateDidiCompany(DidiCompany didiCompany) throws Exception {
        return didiCompanyDaoService.updateDidiCompany(didiCompany);
    }

    @Override
    public boolean deleteDidiCompany(Long id) throws Exception {
        return didiCompanyDaoService.deleteDidiCompany(id);
    }

    @Override
    public DidiCompany getById(Long id) {
        return didiCompanyDaoService.getById(id);
    }

    @Override
    public Paging<DidiCompany> getDidiCompanyPageList(DidiCompanyPageParam didiCompanyPageParam) throws Exception {
        return didiCompanyDaoService.getDidiCompanyPageList(didiCompanyPageParam);
    }
}
